package cn.byapps.attendance.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name = "_favjob")
public class FavJob implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name = "_id", length = 50)
	private String id;
	@Column(name = "cellphone", length = 20)
	private String cellphone;

	@ManyToOne
	@JoinColumn(name = "_first")
	private Job firstJob;
	@ManyToOne
	@JoinColumn(name = "_second")
	private Job secondJob;
	@ManyToOne
	@JoinColumn(name = "_third")
	private Job thirdJob;
	@JsonIgnore
	@OneToOne
	@JoinColumn(name = "_student_id")
	private Student student;

	public Job getThirdJob() {
		return thirdJob;
	}

	public void setThirdJob(Job thirdJob) {
		this.thirdJob = thirdJob;
	}

	public String getCellphone() {
		return cellphone;
	}

	public void setCellphone(String cellphone) {
		this.cellphone = cellphone;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Job getFirstJob() {
		return firstJob;
	}

	public void setFirstJob(Job firstJob) {
		this.firstJob = firstJob;
	}

	public Job getSecondJob() {
		return secondJob;
	}

	public void setSecondJob(Job secondJob) {
		this.secondJob = secondJob;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}
}
